<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: esp8266/rtc.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_cc2d49507704e901eabd8a82be491fc5.html">esp8266</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">rtc.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="rtc_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#ifndef _RTC_H_</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#define _RTC_H_</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="rtc_8h.html#a3925233b7b37e63f8555ec63d941c847">   16</a></span>&#160;<span class="preprocessor">#define  DS1307  0xd0</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">/* rtc.c */</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="rtc_8h.html#a21b4daa6e014855954f0c65787118d3b">BINtoBCD</a> ( <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> data );</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="rtc_8h.html#a67b98d6ab52f9bfdd37f8ab0e706e3dd">BCDtoBIN</a> ( <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> data );</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> <a class="code" href="earth2wireframe_8c.html#aef44329758059c91c76d334e8fc09700">int8_t</a> <a class="code" href="rtc_8h.html#a9751c935395ca9c0355daa4bd91628bc">rtc_run_test</a> ( <span class="keywordtype">void</span> );</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> <span class="keywordtype">int</span> <a class="code" href="rtc_8h.html#aedc81e1ee7ba3a324003ab7dc50d9c8f">rtc_run</a> ( <span class="keywordtype">int</span> run );</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="rtc_8h.html#a3c7ee7e39d1623daa499466e8cf55a71">rtc_init</a> ( <span class="keywordtype">int</span> force , <a class="code" href="time_8h.html#a3346b04b0420b32ccf6b706551b70762">time_t</a> <a class="code" href="user__main_8c.html#ae112d79896ed83ac05e155da60e85523">seconds</a> );</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="rtc_8h.html#a6324e98b85496ce2a90962bca93e77c9">rtc_write</a> ( <a class="code" href="structtm.html">tm_t</a> *t );</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="rtc_8h.html#ab6c620f2f0bcbe90b65ecc723c03b645">rtc_read</a> ( <a class="code" href="structtm.html">tm_t</a> *t );</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="rtc_8h_html_aedc81e1ee7ba3a324003ab7dc50d9c8f"><div class="ttname"><a href="rtc_8h.html#aedc81e1ee7ba3a324003ab7dc50d9c8f">rtc_run</a></div><div class="ttdeci">MEMSPACE int rtc_run(int run)</div><div class="ttdoc">Set DS1307 run state. </div><div class="ttdef"><b>Definition:</b> <a href="rtc_8c_source.html#l00087">rtc.c:87</a></div></div>
<div class="ttc" id="rtc_8h_html_a67b98d6ab52f9bfdd37f8ab0e706e3dd"><div class="ttname"><a href="rtc_8h.html#a67b98d6ab52f9bfdd37f8ab0e706e3dd">BCDtoBIN</a></div><div class="ttdeci">MEMSPACE uint8_t BCDtoBIN(uint8_t data)</div><div class="ttdoc">Convert two &quot;digit&quot; BCD number to binary. </div><div class="ttdef"><b>Definition:</b> <a href="rtc_8c_source.html#l00048">rtc.c:48</a></div></div>
<div class="ttc" id="rtc_8h_html_a3c7ee7e39d1623daa499466e8cf55a71"><div class="ttname"><a href="rtc_8h.html#a3c7ee7e39d1623daa499466e8cf55a71">rtc_init</a></div><div class="ttdeci">MEMSPACE uint8_t rtc_init(int force, time_t seconds)</div><div class="ttdoc">Initialize DS1307 rtc if not initialied - or if forced. </div><div class="ttdef"><b>Definition:</b> <a href="rtc_8c_source.html#l00121">rtc.c:121</a></div></div>
<div class="ttc" id="time_8h_html_a3346b04b0420b32ccf6b706551b70762"><div class="ttname"><a href="time_8h.html#a3346b04b0420b32ccf6b706551b70762">time_t</a></div><div class="ttdeci">uint32_t time_t</div><div class="ttdoc">type of EPOCH result. </div><div class="ttdef"><b>Definition:</b> <a href="time_8h_source.html#l00035">time.h:35</a></div></div>
<div class="ttc" id="rtc_8h_html_a9751c935395ca9c0355daa4bd91628bc"><div class="ttname"><a href="rtc_8h.html#a9751c935395ca9c0355daa4bd91628bc">rtc_run_test</a></div><div class="ttdeci">MEMSPACE int8_t rtc_run_test(void)</div><div class="ttdoc">Check if the DS1307 device is running. </div><div class="ttdef"><b>Definition:</b> <a href="rtc_8c_source.html#l00063">rtc.c:63</a></div></div>
<div class="ttc" id="earth2wireframe_8c_html_aef44329758059c91c76d334e8fc09700"><div class="ttname"><a href="earth2wireframe_8c.html#aef44329758059c91c76d334e8fc09700">int8_t</a></div><div class="ttdeci">signed char int8_t</div><div class="ttdef"><b>Definition:</b> <a href="earth2wireframe_8c_source.html#l00040">earth2wireframe.c:40</a></div></div>
<div class="ttc" id="rtc_8h_html_ab6c620f2f0bcbe90b65ecc723c03b645"><div class="ttname"><a href="rtc_8h.html#ab6c620f2f0bcbe90b65ecc723c03b645">rtc_read</a></div><div class="ttdeci">MEMSPACE uint8_t rtc_read(tm_t *t)</div><div class="ttdoc">Read DS1307 RTC into POSIX struct tm * structure. </div><div class="ttdef"><b>Definition:</b> <a href="rtc_8c_source.html#l00238">rtc.c:238</a></div></div>
<div class="ttc" id="structtm_html"><div class="ttname"><a href="structtm.html">tm</a></div><div class="ttdoc">POSIX struct tm. </div><div class="ttdef"><b>Definition:</b> <a href="time_8h_source.html#l00041">time.h:41</a></div></div>
<div class="ttc" id="rtc_8h_html_a21b4daa6e014855954f0c65787118d3b"><div class="ttname"><a href="rtc_8h.html#a21b4daa6e014855954f0c65787118d3b">BINtoBCD</a></div><div class="ttdeci">MEMSPACE uint8_t BINtoBCD(uint8_t data)</div><div class="ttdoc">Convert number &gt;= 0 and &lt;= 99 to BCD. </div><div class="ttdef"><b>Definition:</b> <a href="rtc_8c_source.html#l00036">rtc.c:36</a></div></div>
<div class="ttc" id="cpu_8h_html_ad0fe97585b8891f5e4f2b9a6426330a4"><div class="ttname"><a href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="ttdeci">#define MEMSPACE</div><div class="ttdef"><b>Definition:</b> <a href="cpu_8h_source.html#l00025">cpu.h:25</a></div></div>
<div class="ttc" id="send_8c_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> <a href="send_8c_source.html#l00017">send.c:17</a></div></div>
<div class="ttc" id="user__main_8c_html_ae112d79896ed83ac05e155da60e85523"><div class="ttname"><a href="user__main_8c.html#ae112d79896ed83ac05e155da60e85523">seconds</a></div><div class="ttdeci">time_t seconds</div><div class="ttdef"><b>Definition:</b> <a href="user__main_8c_source.html#l00293">user_main.c:293</a></div></div>
<div class="ttc" id="rtc_8h_html_a6324e98b85496ce2a90962bca93e77c9"><div class="ttname"><a href="rtc_8h.html#a6324e98b85496ce2a90962bca93e77c9">rtc_write</a></div><div class="ttdeci">MEMSPACE uint8_t rtc_write(tm_t *t)</div><div class="ttdoc">Set DS1307 RTC from POSIX struct tm * structure. </div><div class="ttdef"><b>Definition:</b> <a href="rtc_8c_source.html#l00189">rtc.c:189</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
